<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <link rel="shortcut icon" href="./favicon.ico">
  <link rel="stylesheet" href="./css/common.css">
  <link rel="stylesheet" href="https://at.alicdn.com/t/font_2143783_iq6z4ey5vu.css">
  <link rel="stylesheet" href="./css/zhifu.css">
</head>

<body>
  <div class="xtx_topnav">
    <div class="wrapper">
      <!-- 顶部导航 -->
      <ul class="xtx_navs">
        <li>
          <!-- 有用户名数据 -->
          <!-- <a href="javascript:;"><i class="iconfont icon-user">用户名</i></a> -->
          <!-- 没有用户名数据 -->
          <a href="login/login.html">请先登录</a>
        </li>
        <li>
          <!-- 有用户名数据 -->
          <!-- <a href="javascript:;">退出登录</a> -->
          <!-- 没有用户名数据 -->
          <a href="./register.html">免费注册</a>
        </li>
        <li> 
          <a href="./center-order.html">我的订单</a>
        </li>
        <li>
          <a href="./center.html">会员中心</a>
        </li>
        <li>
          <a href="javascript:;">帮助中心</a>
        </li>
        <li>
          <a href="javascript:;">在线客服</a>
        </li>
        <li>
          <a href="javascript:;">
            <i class="mobile sprites"></i>
            手机版
          </a>
        </li>
      </ul>

    </div>
  </div>

  <!-- 固定导航栏 -->
  <div class="header">
    <div class="wrapper">
      <!-- 固定导航栏logo -->
      <h2 class="xtx_logo"><a href="/"></a></h2>
      <div class="xtx_navs">
        <ul class="clearfix">
          <li>
            <a href="./index.html">首页</a>
          </li>
          <li>
            <a href="./category01.html">生鲜</a>
          </li>
          <li>
            <a href="./category01.html">美食</a>
          </li>
          <li>
            <a href="./category01.html">餐厨</a>
          </li>
          <li>
            <a href="./category01.html">电器</a>
          </li>
          <li>
            <a href="./category01.html">居家</a>
          </li>
          <li>
            <a href="./category01.html">洗护</a>
          </li>
          <li>
            <a href="./category01.html">孕婴</a>
          </li>
          <li>
            <a href="./category01.html">服装</a>
          </li>
          <li>
            <a href="./category01.html">数码</a>
          </li>
          <li class="fenge">|</li>
          <li>
            <a href="./category01.html">运动</a>
          </li>
          <li>
            <a href="./category01.html">杂项</a>
          </li>
        </ul>
      </div>
    </div>
  </div>
  <div class="backtop">
    <a href="javascript:;"></a>
  </div>
  <!-- 头部 -->
  <div class="xtx_header">
    <div class="wrapper">
      <!-- 网站Logo -->
      <h1 class="xtx_logo"><a href="/">小兔鲜儿</a></h1>
      <!-- 主导航 -->
      <div class="xtx_navs">
        <ul class="clearfix">
          <li>
            <a href="./index.html">首页</a>
          </li>
          <li>
            <a href="./category01.html">生鲜</a>
          </li>
          <li>
            <a href="./category01.html">美食</a>
          </li>
          <li>
            <a href="./category01.html">餐厨</a>
          </li>
          <li>
            <a href="./category01.html">电器</a>
          </li>
          <li>
            <a href="./category01.html">居家</a>
          </li>
          <li>
            <a href="./category01.html">洗护</a>
          </li>
          <li>
            <a href="./category01.html">孕婴</a>
          </li>
          <li>
            <a href="./category01.html">服装</a>
          </li>
        </ul>
      </div>
      <!-- 站内搜索 -->
      <div class="xtx_search clearfix">
        <!-- 购物车 -->
        <a href="./cart-none.html" class="xtx_search_cart sprites">
          <i>1</i>
        </a>
        <!-- 搜索框 -->
        <div class="xtx_search_wrapper">
          <input type="text" placeholder="搜一搜" onclick="location.href='./search.html'">
        </div>
      </div>
    </div>
  </div>



  <div id="app">
    <div class="xtx-pay-page">
      <div class="wrapper">
        <div class="xtx_bread">
          <div class="xtx_bread-item">
            <a href="">首页</a>
          </div>
          <div class="iconfont icon-angle-right"></div>
          <div class="xtx_bread-item">
            <a href="">购物车</a>
          </div>
          <div class="iconfont icon-angle-right"></div>
          <div class="xtx_bread-item">
            <a href="">支付订单</a>
          </div>
        </div>

        <!-- 支付倒计时 -->
        <div class="pay-info">
          <span class="icon iconfont icon-queren2"></span>
          <div class="tip">
            <p>订单提交成功！请尽快完成支付</p>
            <p class="timer">支付还剩 <span id="countdown-timer"></span>,超时后将取消订单</p>
          </div>
          <div class="amount">
            <span>应付总额：</span>
            <span>￥136</span>
          </div>
        </div>
        <div class="pay-type">
          <p class="head">请选择以下方式付款</p>
          <div class="item">
            <p>支付平台</p>
            <a class="btn wx" href=""></a>
            <a class="btn alipay"
              href="./alipay.html">
            </a>
          </div>
          <div class="item">
            <p>支付方式</p>
            <a class="btn" href="">招商银行</a>
            <a class="btn" href="">工商银行</a>
            <a class="btn" href="">建设银行</a>
            <a class="btn" href="">农业银行</a>
            <a class="btn" href="">交通银行</a>
          </div>
        </div>
        <div class="box"></div>
      </div>
    </div>
  </div>

  <!-- 公共底部 -->
  <div class="xtx_footer clearfix">
    <div class="wrapper">
      <!-- 联系我们 -->
      <div class="contact clearfix">
        <dl>
          <dt>客户服务</dt>
          <dd class="chat">在线客服</dd>
          <dd class="feedback">问题反馈</dd>
        </dl>
        <dl>
          <dt>关注我们</dt>
          <dd class="weixin">公众号</dd>
          <dd class="weibo">微博</dd>
        </dl>
        <dl>
          <dt>下载APP</dt>
          <dd class="qrcode">
            <img src="./uploads/qrcode.jpg">
          </dd>
          <dd class="download">
            <span>扫描二维码</span>
            <span>立马下载APP</span>
            <a href="javascript:;">下载页面</a>
          </dd>
        </dl>
        <dl>
          <dt>服务热线</dt>
          <dd class="hotline">
            400-0000-000
            <small>周一至周日 8:00-18:00</small>
          </dd>
        </dl>
      </div>
    </div>
    <!-- 其它 -->
    <div class="extra">
      <div class="wrapper">
        <!-- 口号 -->
        <div class="slogan">
          <a href="javascript:;" class="price">价格亲民</a>
          <a href="javascript:;" class="express">物流快捷</a>
          <a href="javascript:;" class="quality">品质新鲜</a>
        </div>
        <!-- 版权信息 -->
        <div class="copyright">
          <p>
            <a href="javascript:;">关于我们</a>
            <a href="javascript:;">帮助中心</a>
            <a href="javascript:;">售后服务</a>
            <a href="javascript:;">配送与验收</a>
            <a href="javascript:;">商务合作</a>
            <a href="javascript:;">搜索推荐</a>
            <a href="javascript:;">友情链接</a>
          </p>
          <p>CopyRight &copy; 小兔鲜儿</p>
        </div>
      </div>
    </div>
  </div>
</body>
<script>

  // 当页面滚动到首页模块时, 显示header
  const header = document.querySelector('.header')
  const sk = document.querySelector('.xtx_bread')
  const scrollLimit = sk.offsetTop //

  // 监听页面滚动
  window.addEventListener('scroll', function () {
    if (document.documentElement.scrollTop > scrollLimit) {
      header.style.top = '0px'
    } else {
      header.style.top = '-80px'
    }
  })

  // 设置结束时间为30分钟后
  const endTime = new Date();
  endTime.setMinutes(endTime.getMinutes() + 30);
  // 获取倒计时计时器元素
  const countdownTimer = document.getElementById('countdown-timer');
  // 计算并更新倒计时
  function updateCountdown() {
    const currentTime = new Date();
    const timeDifference = endTime - currentTime;
    // 计算剩余时间
    const minutes = Math.floor(timeDifference / 1000 / 60);
    const seconds = Math.floor(timeDifference / 1000 % 60)
    // 更新计时器元素
    countdownTimer.textContent = `${minutes}分${seconds.toString().padStart(2, '0')}秒`;
    // 倒计时结束时停止计时器
    if (timeDifference <= 0) {
      clearInterval(countdownInterval);
      countdownTimer.textContent = '支付超时';
    }
  }
  // 初始计算并更新倒计时
  updateCountdown();
  // 设置倒计时计时器
  const countdownInterval = setInterval(updateCountdown, 1000);
</script>

</html>